<?php
session_start();
session_id();

$_SESSION['iJobID'] = (@$_REQUEST['iJobID'] ? $_REQUEST['iJobID'] : (int)@$_SESSION['iJobID']);

if (@$_REQUEST['fJobVar'])
{
	$_SESSION['oJobSettings'][$_SESSION['iJobID']][$_REQUEST['fJobVar']] = $_REQUEST['fJobValue'];
}

if (!is_array(@$_SESSION['oUserVars']))
{
	$_SESSION['oUserVars'] = array();
}
if (@$_REQUEST['sVar'])
{
	UserHandler::setUserVar($_REQUEST['sVar'], $_REQUEST['mValue']);
	$_SESSION['oUserVars'][$_REQUEST['sVar']] = $_REQUEST['mValue'];
}

$oUserVarsDefaults = array(
	'images' => 16,
	'language' => DEFAULT_LANGUAGE,
	'hidenav' => 0,
);

foreach ($oUserVarsDefaults as $sVar => $mValue)
{
	if (!@$_SESSION['oUserVars'][$sVar])
	{
		$_SESSION['oUserVars'][$sVar] = $mValue;
	}
}

?>
